/**
 * 
 */
package com.axxc.jpa.vo;

import java.io.Serializable;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.http.HttpStatus;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: ResponseVO
 * @Description: 统一返回视图对象
 * @author 熊小川
 * @date 2018年5月4日 下午10:33:31
 */
@ApiModel(value = "统一返回视图对象")
public class ResponseVO<T> implements Serializable {
	private static final long serialVersionUID = 599213578451620504L;

	@ApiModelProperty(value = "返回状态", example = "200")
	private HttpStatus status = HttpStatus.OK;
	@ApiModelProperty(value = "返回消息", example = "success")
	private String message = "success";
	@ApiModelProperty(value = "总页数")
	private Integer totalPage;
	@ApiModelProperty(value = "当前页", example = "1")
	private Integer currentPage = 1;
	@ApiModelProperty(value = "每页条数", example = "10")
	private Integer pageSize;
	@ApiModelProperty(value = "数据条数", example = "0")
	private Long total = 0L;
	@ApiModelProperty(value = "返回数据内容")
	private T content;

	public Integer getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}


	public ResponseVO(T content) {
		super();
		this.content = content;
	}


	public HttpStatus getStatus() {
		return status;
	}

	public void setStatus(HttpStatus status) {
		this.status = status;
	}

	public T getContent() {
		return content;
	}

	public void setContent(T content) {
		this.content = content;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	@Override
	public String toString() {
		// 高级用法
		return ToStringBuilder.reflectionToString(this);
	}

}
